谷哥大大您好
感謝您的分享,讓我受益良多,
在做到Day23的解決重新整理問題的地方,上傳圖片後按下確認會一直loading畫面(轉圈),F12顯示error:
Uncaught (in promise) TypeError: user.updateProfile is not a function
出現這個錯誤後連帶之前完成的發布文章的功能也無法上傳,檢查過程式碼應該是沒問題,不知道是不是firebase的問題
"name": "react-app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "react-scripts start"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"again": "^0.0.1",
"firebase": "^9.6.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^2.0.4"
},
完整程式碼:
https://github.com/Enohuang3108/React-APP/tree/master
第一次提問還請見諒,先謝謝了
https://github.com/Enohuang3108/React-APP/blob/master/src/pages/MyInfo.js#L12
小括號裡面要改成 { user }
喔(透過解構的方式從 props 拿到 user)
我的天,居然沒有注意到..我回去重看10次..
非常感謝大大撥空解題